package com.kayt.cyberBar.company.business.entity.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.hibernate.annotations.Where;

/**
 * BCompanyWareAssembleInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "b_company_ware_assemble_info", catalog = "cyber")
public class BCompanyWareAssembleInfo implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 6316531081111331789L;
	private Integer id;
	private String wareAssembleBaseCode;
	private String wareBaseName;
	private String wareCount;
	private String updateTime;
	private String createTime;
	private String status;

	private BCompanyWareBase ware;
	// Constructors

	/** default constructor */
	public BCompanyWareAssembleInfo() {
	}

	/** full constructor */
	public BCompanyWareAssembleInfo(String wareAssembleBaseCode,
			BCompanyWareBase ware, String wareBaseName, String wareCount,
			String updateTime, String createTime, String status) {
		this.wareAssembleBaseCode = wareAssembleBaseCode;
		this.wareBaseName = wareBaseName;
		this.wareCount = wareCount;
		this.updateTime = updateTime;
		this.createTime = createTime;
		this.status = status;
		this.ware = ware;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "WARE_ASSEMBLE_BASE_CODE")
	public String getWareAssembleBaseCode() {
		return this.wareAssembleBaseCode;
	}

	public void setWareAssembleBaseCode(String wareAssembleBaseCode) {
		this.wareAssembleBaseCode = wareAssembleBaseCode;
	}

	@Column(name = "WARE_BASE_NAME")
	public String getWareBaseName() {
		return this.wareBaseName;
	}

	public void setWareBaseName(String wareBaseName) {
		this.wareBaseName = wareBaseName;
	}

	@Column(name = "WARE_COUNT")
	public String getWareCount() {
		return this.wareCount;
	}

	public void setWareCount(String wareCount) {
		this.wareCount = wareCount;
	}

	@Column(name = "UPDATE_TIME", length = 0)
	public String getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "CREATE_TIME", length = 0)
	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	@Column(name = "STATUS")
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@ManyToOne(targetEntity = BCompanyWareBase.class, fetch = FetchType.LAZY)
	@JoinColumn(name="WARE_BASE_CODE", referencedColumnName="CODE", nullable = false, insertable=false, updatable=false)
	@JsonIgnore
	public BCompanyWareBase getWare() {
		return ware;
	}


	public void setWare(BCompanyWareBase ware) {
		this.ware = ware;
	}
}